<html>
<head>
<title>Turbo Vision reference</title>
</head>
<body>
<H1>Turbo Vision reference</H1>

This document describes the functions of Turbo Vision that didn't
exist in the original version of the library.<br>
Note that only a few things are documented here, I need help to populate
this file.

<p>

This document applies to version 2.0.0
of the Turbo Vision library.

<p>


<Menu>
<li><a href="#Alphabetical List">Alphabetical list of functions</a>
<li><a href="#Classes">List by classes</a>
<li><a href="#Modules">List by modules</a>
<li><a href="#Files">List by files</a>
</Menu>



<p><hr></p>
<a name="Alphabetical List"></a>
<H1>Alphabetical List</H1>

<Menu>
<li><a href="#Add (TVMainConfigFile)">Add (TVMainConfigFile)</a>
<li><a href="#Add (TVMainConfigFile) <1>">Add (TVMainConfigFile) <1></a>
<li><a href="#AddCodePage (TVCodePage)">AddCodePage (TVCodePage)</a>
<li><a href="#AddInt (TVConfigFile)">AddInt (TVConfigFile)</a>
<li><a href="#AddString (TVConfigFile)">AddString (TVConfigFile)</a>
<li><a href="#CheckForLines (TVFontCollection)">CheckForLines (TVFontCollection)</a>
<li><a href="#CheckSignature (TVFontCollection)">CheckSignature (TVFontCollection)</a>
<li><a href="#CodePageOfID (TVCodePage)">CodePageOfID (TVCodePage)</a>
<li><a href="#CreateCodePagesCol (TVCodePage)">CreateCodePagesCol (TVCodePage)</a>
<li><a href="#CreateCPFromUnicode (TVCodePage)">CreateCPFromUnicode (TVCodePage)</a>
<li><a href="#CreateFont (TVFontCollection)">CreateFont (TVFontCollection)</a>
<li><a href="#CreateListOfFonts (TVFontCollection)">CreateListOfFonts (TVFontCollection)</a>
<li><a href="#CreateOnTheFlyInpRemap (TVCodePage)">CreateOnTheFlyInpRemap (TVCodePage)</a>
<li><a href="#CreateOnTheFlyRemap (TVCodePage)">CreateOnTheFlyRemap (TVCodePage)</a>
<li><a href="#CreateRemap (TVCodePage)">CreateRemap (TVCodePage)</a>
<li><a href="#defaultCheckForWindowSize (TDisplay)">defaultCheckForWindowSize (TDisplay)</a>
<li><a href="#defaultClearScreen (TDisplay)">defaultClearScreen (TDisplay)</a>
<li><a href="#defaultGetBlinkState (TDisplay)">defaultGetBlinkState (TDisplay)</a>
<li><a href="#defaultGetCols (TDisplay)">defaultGetCols (TDisplay)</a>
<li><a href="#defaultGetCrtMode (TDisplay)">defaultGetCrtMode (TDisplay)</a>
<li><a href="#defaultGetCursorShape (TDisplay)">defaultGetCursorShape (TDisplay)</a>
<li><a href="#defaultGetRows (TDisplay)">defaultGetRows (TDisplay)</a>
<li><a href="#defaultGetWindowTitle (TDisplay)">defaultGetWindowTitle (TDisplay)</a>
<li><a href="#defaultSetCrtMode (TDisplay)">defaultSetCrtMode (TDisplay)</a>
<li><a href="#defaultSetCrtModeExt (TDisplay)">defaultSetCrtModeExt (TDisplay)</a>
<li><a href="#defaultSetCrtModeRes (TDisplay)">defaultSetCrtModeRes (TDisplay)</a>
<li><a href="#defaultSetCursorShape (TDisplay)">defaultSetCursorShape (TDisplay)</a>
<li><a href="#defaultSetWindowTitle (TDisplay)">defaultSetWindowTitle (TDisplay)</a>
<li><a href="#EnlargeOne (TVFontCollection)">EnlargeOne (TVFontCollection)</a>
<li><a href="#FillTables (TVCodePage)">FillTables (TVCodePage)</a>
<li><a href="#FillTEvent (TGKeyXTerm)">FillTEvent (TGKeyXTerm)</a>
<li><a href="#freeItem (TVFontCollection)">freeItem (TVFontCollection)</a>
<li><a href="#GetFont (TVFontCollection)">GetFont (TVFontCollection)</a>
<li><a href="#GetKeyParsed (TGKeyXTerm)">GetKeyParsed (TGKeyXTerm)</a>
<li><a href="#GetList (TVCodePage)">GetList (TVCodePage)</a>
<li><a href="#GetRaw (TGKeyXTerm)">GetRaw (TGKeyXTerm)</a>
<li><a href="#GetShiftState (TGKeyXTerm)">GetShiftState (TGKeyXTerm)</a>
<li><a href="#GetTranslate (TVCodePage)">GetTranslate (TVCodePage)</a>
<li><a href="#GetWindowTitle (TDisplayDOS)">GetWindowTitle (TDisplayDOS)</a>
<li><a href="#GKey (TGKeyXTerm)">GKey (TGKeyXTerm)</a>
<li><a href="#IDToIndex (TVCodePage)">IDToIndex (TVCodePage)</a>
<li><a href="#IndexToID (TVCodePage)">IndexToID (TVCodePage)</a>
<li><a href="#InitOnce (TGKeyXTerm)">InitOnce (TGKeyXTerm)</a>
<li><a href="#InternalCodeForUnicode (TVCodePage)">InternalCodeForUnicode (TVCodePage)</a>
<li><a href="#Load (TVConfigFile)">Load (TVConfigFile)</a>
<li><a href="#Load (TVMainConfigFile)">Load (TVMainConfigFile)</a>
<li><a href="#LookSimilarInRange (TVCodePage)">LookSimilarInRange (TVCodePage)</a>
<li><a href="#moveBuf (TDrawBuffer)">moveBuf (TDrawBuffer)</a>
<li><a href="#moveChar (TDrawBuffer)">moveChar (TDrawBuffer)</a>
<li><a href="#moveCStr (TDrawBuffer)">moveCStr (TDrawBuffer)</a>
<li><a href="#moveStr (TDrawBuffer)">moveStr (TDrawBuffer)</a>
<li><a href="#Print (TVConfigFile)">Print (TVConfigFile)</a>
<li><a href="#Print (TVMainConfigFile)">Print (TVMainConfigFile)</a>
<li><a href="#ProcessEscape (TGKeyXTerm)">ProcessEscape (TGKeyXTerm)</a>
<li><a href="#ReadFontInfo (TVFontCollection)">ReadFontInfo (TVFontCollection)</a>
<li><a href="#ReadName (TVFontCollection)">ReadName (TVFontCollection)</a>
<li><a href="#ReadVersionNum (TVFontCollection)">ReadVersionNum (TVFontCollection)</a>
<li><a href="#ReduceOne (TVFontCollection)">ReduceOne (TVFontCollection)</a>
<li><a href="#RemapBufferGeneric (TVCodePage)">RemapBufferGeneric (TVCodePage)</a>
<li><a href="#RemapChar (TVCodePage)">RemapChar (TVCodePage)</a>
<li><a href="#RemapNString (TVCodePage)">RemapNString (TVCodePage)</a>
<li><a href="#RemapString (TVCodePage)">RemapString (TVCodePage)</a>
<li><a href="#RemapTVStrings (TVCodePage)">RemapTVStrings (TVCodePage)</a>
<li><a href="#Resume (TGKeyXTerm)">Resume (TGKeyXTerm)</a>
<li><a href="#Search (TVConfigFile)">Search (TVConfigFile)</a>
<li><a href="#Search (TVMainConfigFile)">Search (TVMainConfigFile)</a>
<li><a href="#Search (TVMainConfigFile) <1>">Search (TVMainConfigFile) <1></a>
<li><a href="#Search (TVMainConfigFile) <2>">Search (TVMainConfigFile) <2></a>
<li><a href="#Search (TVMainConfigFile) <3>">Search (TVMainConfigFile) <3></a>
<li><a href="#searchDOSModeInfo (TDisplay)">searchDOSModeInfo (TDisplay)</a>
<li><a href="#SetCallBack (TVCodePage)">SetCallBack (TVCodePage)</a>
<li><a href="#SetCodePage (TVCodePage)">SetCodePage (TVCodePage)</a>
<li><a href="#SetCodePage (TVFontCollection)">SetCodePage (TVFontCollection)</a>
<li><a href="#SetCrtMode (TDisplayDOS)">SetCrtMode (TDisplayDOS)</a>
<li><a href="#setCursorType (TDisplay)">setCursorType (TDisplay)</a>
<li><a href="#SetUserConfigFile (TVMainConfigFile)">SetUserConfigFile (TVMainConfigFile)</a>
<li><a href="#SetWindowTitle (TDisplayDOS)">SetWindowTitle (TDisplayDOS)</a>
<li><a href="#Suspend (TGKeyXTerm)">Suspend (TGKeyXTerm)</a>
<li><a href="#testForSupport (TDisplayDOS)">testForSupport (TDisplayDOS)</a>
<li><a href="#TScreen (TScreen)">TScreen (TScreen)</a>
<li><a href="#TVCodePage (TVCodePage)">TVCodePage (TVCodePage)</a>
<li><a href="#TVConfigFile (TVConfigFile)">TVConfigFile (TVConfigFile)</a>
<li><a href="#TVFontCollection (TVFontCollection)">TVFontCollection (TVFontCollection)</a>
<li><a href="#TVMainConfigFile (TVMainConfigFile)">TVMainConfigFile (TVMainConfigFile)</a>
<li><a href="#UnicodeForInternalCode (TVCodePage)">UnicodeForInternalCode (TVCodePage)</a>
<li><a href="#~TVCodePage (TVCodePage)">~TVCodePage (TVCodePage)</a>
<li><a href="#~TVConfigFile (TVConfigFile)">~TVConfigFile (TVConfigFile)</a>
<li><a href="#~TVMainConfigFile (TVMainConfigFile)">~TVMainConfigFile (TVMainConfigFile)</a>
</Menu>



<p><hr></p>
<a name="Classes"></a>
<H1>Classes</H1>

<Menu>
<li><a href="#TDisplay (class)">TDisplay</a>
<li><a href="#TDisplayDOS (class)">TDisplayDOS</a>
<li><a href="#TDrawBuffer (class)">TDrawBuffer</a>
<li><a href="#TGKeyXTerm (class)">TGKeyXTerm</a>
<li><a href="#TScreen (class)">TScreen</a>
<li><a href="#TVCodePage (class)">TVCodePage</a>
<li><a href="#TVConfigFile (class)">TVConfigFile</a>
<li><a href="#TVFontCollection (class)">TVFontCollection</a>
<li><a href="#TVMainConfigFile (class)">TVMainConfigFile</a>
</Menu>


<p><hr></p>
<a name="TDisplay (class)"></a>
<H1>TDisplay</H1>



<Menu>
<li><a href="#defaultCheckForWindowSize (TDisplay)">defaultCheckForWindowSize (TDisplay)</a>
<li><a href="#defaultClearScreen (TDisplay)">defaultClearScreen (TDisplay)</a>
<li><a href="#defaultGetBlinkState (TDisplay)">defaultGetBlinkState (TDisplay)</a>
<li><a href="#defaultGetCols (TDisplay)">defaultGetCols (TDisplay)</a>
<li><a href="#defaultGetCrtMode (TDisplay)">defaultGetCrtMode (TDisplay)</a>
<li><a href="#defaultGetCursorShape (TDisplay)">defaultGetCursorShape (TDisplay)</a>
<li><a href="#defaultGetRows (TDisplay)">defaultGetRows (TDisplay)</a>
<li><a href="#defaultGetWindowTitle (TDisplay)">defaultGetWindowTitle (TDisplay)</a>
<li><a href="#defaultSetCrtMode (TDisplay)">defaultSetCrtMode (TDisplay)</a>
<li><a href="#defaultSetCrtModeExt (TDisplay)">defaultSetCrtModeExt (TDisplay)</a>
<li><a href="#defaultSetCrtModeRes (TDisplay)">defaultSetCrtModeRes (TDisplay)</a>
<li><a href="#defaultSetCursorShape (TDisplay)">defaultSetCursorShape (TDisplay)</a>
<li><a href="#defaultSetWindowTitle (TDisplay)">defaultSetWindowTitle (TDisplay)</a>
<li><a href="#searchDOSModeInfo (TDisplay)">searchDOSModeInfo (TDisplay)</a>
<li><a href="#setCursorType (TDisplay)">setCursorType (TDisplay)</a>
</Menu>



<p><hr></p>
<a name="TDisplayDOS (class)"></a>
<H1>TDisplayDOS</H1>



<Menu>
<li><a href="#GetWindowTitle (TDisplayDOS)">GetWindowTitle (TDisplayDOS)</a>
<li><a href="#SetCrtMode (TDisplayDOS)">SetCrtMode (TDisplayDOS)</a>
<li><a href="#SetWindowTitle (TDisplayDOS)">SetWindowTitle (TDisplayDOS)</a>
<li><a href="#testForSupport (TDisplayDOS)">testForSupport (TDisplayDOS)</a>
</Menu>



<p><hr></p>
<a name="TDrawBuffer (class)"></a>
<H1>TDrawBuffer</H1>



<Menu>
<li><a href="#moveBuf (TDrawBuffer)">moveBuf (TDrawBuffer)</a>
<li><a href="#moveChar (TDrawBuffer)">moveChar (TDrawBuffer)</a>
<li><a href="#moveCStr (TDrawBuffer)">moveCStr (TDrawBuffer)</a>
<li><a href="#moveStr (TDrawBuffer)">moveStr (TDrawBuffer)</a>
</Menu>



<p><hr></p>
<a name="TGKeyXTerm (class)"></a>
<H1>TGKeyXTerm</H1>



<Menu>
<li><a href="#FillTEvent (TGKeyXTerm)">FillTEvent (TGKeyXTerm)</a>
<li><a href="#GetKeyParsed (TGKeyXTerm)">GetKeyParsed (TGKeyXTerm)</a>
<li><a href="#GetRaw (TGKeyXTerm)">GetRaw (TGKeyXTerm)</a>
<li><a href="#GetShiftState (TGKeyXTerm)">GetShiftState (TGKeyXTerm)</a>
<li><a href="#GKey (TGKeyXTerm)">GKey (TGKeyXTerm)</a>
<li><a href="#InitOnce (TGKeyXTerm)">InitOnce (TGKeyXTerm)</a>
<li><a href="#ProcessEscape (TGKeyXTerm)">ProcessEscape (TGKeyXTerm)</a>
<li><a href="#Resume (TGKeyXTerm)">Resume (TGKeyXTerm)</a>
<li><a href="#Suspend (TGKeyXTerm)">Suspend (TGKeyXTerm)</a>
</Menu>



<p><hr></p>
<a name="TScreen (class)"></a>
<H1>TScreen</H1>



<Menu>
<li><a href="#TScreen (TScreen)">TScreen (TScreen)</a>
</Menu>



<p><hr></p>
<a name="TVCodePage (class)"></a>
<H1>TVCodePage</H1>



<Menu>
<li><a href="#AddCodePage (TVCodePage)">AddCodePage (TVCodePage)</a>
<li><a href="#CodePageOfID (TVCodePage)">CodePageOfID (TVCodePage)</a>
<li><a href="#CreateCodePagesCol (TVCodePage)">CreateCodePagesCol (TVCodePage)</a>
<li><a href="#CreateCPFromUnicode (TVCodePage)">CreateCPFromUnicode (TVCodePage)</a>
<li><a href="#CreateOnTheFlyInpRemap (TVCodePage)">CreateOnTheFlyInpRemap (TVCodePage)</a>
<li><a href="#CreateOnTheFlyRemap (TVCodePage)">CreateOnTheFlyRemap (TVCodePage)</a>
<li><a href="#CreateRemap (TVCodePage)">CreateRemap (TVCodePage)</a>
<li><a href="#FillTables (TVCodePage)">FillTables (TVCodePage)</a>
<li><a href="#GetList (TVCodePage)">GetList (TVCodePage)</a>
<li><a href="#GetTranslate (TVCodePage)">GetTranslate (TVCodePage)</a>
<li><a href="#IDToIndex (TVCodePage)">IDToIndex (TVCodePage)</a>
<li><a href="#IndexToID (TVCodePage)">IndexToID (TVCodePage)</a>
<li><a href="#InternalCodeForUnicode (TVCodePage)">InternalCodeForUnicode (TVCodePage)</a>
<li><a href="#LookSimilarInRange (TVCodePage)">LookSimilarInRange (TVCodePage)</a>
<li><a href="#RemapBufferGeneric (TVCodePage)">RemapBufferGeneric (TVCodePage)</a>
<li><a href="#RemapChar (TVCodePage)">RemapChar (TVCodePage)</a>
<li><a href="#RemapNString (TVCodePage)">RemapNString (TVCodePage)</a>
<li><a href="#RemapString (TVCodePage)">RemapString (TVCodePage)</a>
<li><a href="#RemapTVStrings (TVCodePage)">RemapTVStrings (TVCodePage)</a>
<li><a href="#SetCallBack (TVCodePage)">SetCallBack (TVCodePage)</a>
<li><a href="#SetCodePage (TVCodePage)">SetCodePage (TVCodePage)</a>
<li><a href="#TVCodePage (TVCodePage)">TVCodePage (TVCodePage)</a>
<li><a href="#UnicodeForInternalCode (TVCodePage)">UnicodeForInternalCode (TVCodePage)</a>
<li><a href="#~TVCodePage (TVCodePage)">~TVCodePage (TVCodePage)</a>
</Menu>



<p><hr></p>
<a name="TVConfigFile (class)"></a>
<H1>TVConfigFile</H1>



<Menu>
<li><a href="#AddInt (TVConfigFile)">AddInt (TVConfigFile)</a>
<li><a href="#AddString (TVConfigFile)">AddString (TVConfigFile)</a>
<li><a href="#Load (TVConfigFile)">Load (TVConfigFile)</a>
<li><a href="#Print (TVConfigFile)">Print (TVConfigFile)</a>
<li><a href="#Search (TVConfigFile)">Search (TVConfigFile)</a>
<li><a href="#TVConfigFile (TVConfigFile)">TVConfigFile (TVConfigFile)</a>
<li><a href="#~TVConfigFile (TVConfigFile)">~TVConfigFile (TVConfigFile)</a>
</Menu>



<p><hr></p>
<a name="TVFontCollection (class)"></a>
<H1>TVFontCollection</H1>



<Menu>
<li><a href="#CheckForLines (TVFontCollection)">CheckForLines (TVFontCollection)</a>
<li><a href="#CheckSignature (TVFontCollection)">CheckSignature (TVFontCollection)</a>
<li><a href="#CreateFont (TVFontCollection)">CreateFont (TVFontCollection)</a>
<li><a href="#CreateListOfFonts (TVFontCollection)">CreateListOfFonts (TVFontCollection)</a>
<li><a href="#EnlargeOne (TVFontCollection)">EnlargeOne (TVFontCollection)</a>
<li><a href="#freeItem (TVFontCollection)">freeItem (TVFontCollection)</a>
<li><a href="#GetFont (TVFontCollection)">GetFont (TVFontCollection)</a>
<li><a href="#ReadFontInfo (TVFontCollection)">ReadFontInfo (TVFontCollection)</a>
<li><a href="#ReadName (TVFontCollection)">ReadName (TVFontCollection)</a>
<li><a href="#ReadVersionNum (TVFontCollection)">ReadVersionNum (TVFontCollection)</a>
<li><a href="#ReduceOne (TVFontCollection)">ReduceOne (TVFontCollection)</a>
<li><a href="#SetCodePage (TVFontCollection)">SetCodePage (TVFontCollection)</a>
<li><a href="#TVFontCollection (TVFontCollection)">TVFontCollection (TVFontCollection)</a>
</Menu>



<p><hr></p>
<a name="TVMainConfigFile (class)"></a>
<H1>TVMainConfigFile</H1>



<Menu>
<li><a href="#Add (TVMainConfigFile)">Add (TVMainConfigFile)</a>
<li><a href="#Add (TVMainConfigFile) <1>">Add (TVMainConfigFile) <1></a>
<li><a href="#Load (TVMainConfigFile)">Load (TVMainConfigFile)</a>
<li><a href="#Print (TVMainConfigFile)">Print (TVMainConfigFile)</a>
<li><a href="#Search (TVMainConfigFile)">Search (TVMainConfigFile)</a>
<li><a href="#Search (TVMainConfigFile) <1>">Search (TVMainConfigFile) <1></a>
<li><a href="#Search (TVMainConfigFile) <2>">Search (TVMainConfigFile) <2></a>
<li><a href="#Search (TVMainConfigFile) <3>">Search (TVMainConfigFile) <3></a>
<li><a href="#SetUserConfigFile (TVMainConfigFile)">SetUserConfigFile (TVMainConfigFile)</a>
<li><a href="#TVMainConfigFile (TVMainConfigFile)">TVMainConfigFile (TVMainConfigFile)</a>
<li><a href="#~TVMainConfigFile (TVMainConfigFile)">~TVMainConfigFile (TVMainConfigFile)</a>
</Menu>



<p><hr></p>
<a name="Modules"></a>
<H1>Modules</H1>

<Menu>
<li><a href="#Code Page">Code Page</a>
<li><a href="#Config File">Config File</a>
<li><a href="#Display">Display</a>
<li><a href="#DOS Display">DOS Display</a>
<li><a href="#OS Clipboard">OS Clipboard</a>
<li><a href="#Screen">Screen</a>
<li><a href="#TVFontCollection">TVFontCollection</a>
</Menu>


<p><hr></p>
<a name="Code Page"></a>
<H1>Code Page</H1>

This module provides code page remapping needed to adapt the special
character to all the supported terminals.
<p>

  It was originally designed for SETEdit and moved to Turbo Vision in 2002.
<p>

  The internal encoding system maps the first 256 to CP 437.
<p>

  Important: The Turbo Vision never had such a thing and this is completly
new code that affects a lot of TV components.
<p>

  The mechanism used is similar to what Linux kernel uses, why? simple:<br>
1) That's the most complex mechanism I found in all the targets so far.<br>
2) This is quite crazy but at the same time flexible.<br>
  What's similar?<br>
  We have two maps. The first map is what Linux calls SFM (Screen Font Map).
It defines which internal codes are rendered by each font character (which
unicodes in Linux kernel). This is basically a map that describes the font.
This is the only map I had in the editor. The curScrCP variable holds the
ID of this map.
<p>

  The second map is what the Linux kernel calls ACM (Application Charset
Map). This map describes how is the application data encoded, as an example:
how is encoded the text. It doesn't have to map one to one with the font,
and that's the complex stuff. For this reason this map is used to do an
"on-the-fly" remap before sending the characters to the screen. If this map
is identical to the SFM (maps 1 to 1 =&gt; what Linux calls trivial mapping)
we don't do the remap. The OnTheFlyRemapNeeded() and OnTheFlyRemap(uchar val)
are used for the remap. The curAppCP holds the ID of this map.
<p>

  Is important to note that we don't do 8-bits -&gt; ACM -&gt; Unicode -&gt; SFM -&gt;
8-bits Screen like the Linux kernel does. We recode the application using
the ACM and if ACM!=SFM we use a simple table that makes: 8-bits -&gt; 8-bits
Screen and if it isn't needed we just send the code to the screen.
<p>

  I added a new code page to this: the input code page. In Linux systems
the input is supposed to be encoded in the ACM code page. In Windows systems
they can be different and they are asked with different calls. It can be
useful if you want to use an encoding different than the currently used by
the OS. You can change the screen encoding and load an appropriate font for
it, then you change the application code page and you can properly see
documents encoded in the target code page. But in order to edit them you
need to translate the codes that come from keyboard to the target code page.
That's a good use for the input code page.

<Menu>
<li><a href="#AddCodePage (TVCodePage)">AddCodePage (TVCodePage)</a>
<li><a href="#CodePageOfID (TVCodePage)">CodePageOfID (TVCodePage)</a>
<li><a href="#CreateCodePagesCol (TVCodePage)">CreateCodePagesCol (TVCodePage)</a>
<li><a href="#CreateCPFromUnicode (TVCodePage)">CreateCPFromUnicode (TVCodePage)</a>
<li><a href="#CreateOnTheFlyInpRemap (TVCodePage)">CreateOnTheFlyInpRemap (TVCodePage)</a>
<li><a href="#CreateOnTheFlyRemap (TVCodePage)">CreateOnTheFlyRemap (TVCodePage)</a>
<li><a href="#CreateRemap (TVCodePage)">CreateRemap (TVCodePage)</a>
<li><a href="#FillTables (TVCodePage)">FillTables (TVCodePage)</a>
<li><a href="#GetList (TVCodePage)">GetList (TVCodePage)</a>
<li><a href="#GetTranslate (TVCodePage)">GetTranslate (TVCodePage)</a>
<li><a href="#IDToIndex (TVCodePage)">IDToIndex (TVCodePage)</a>
<li><a href="#IndexToID (TVCodePage)">IndexToID (TVCodePage)</a>
<li><a href="#InternalCodeForUnicode (TVCodePage)">InternalCodeForUnicode (TVCodePage)</a>
<li><a href="#LookSimilarInRange (TVCodePage)">LookSimilarInRange (TVCodePage)</a>
<li><a href="#RemapBufferGeneric (TVCodePage)">RemapBufferGeneric (TVCodePage)</a>
<li><a href="#RemapChar (TVCodePage)">RemapChar (TVCodePage)</a>
<li><a href="#RemapNString (TVCodePage)">RemapNString (TVCodePage)</a>
<li><a href="#RemapString (TVCodePage)">RemapString (TVCodePage)</a>
<li><a href="#RemapTVStrings (TVCodePage)">RemapTVStrings (TVCodePage)</a>
<li><a href="#SetCallBack (TVCodePage)">SetCallBack (TVCodePage)</a>
<li><a href="#SetCodePage (TVCodePage)">SetCodePage (TVCodePage)</a>
<li><a href="#TVCodePage (TVCodePage)">TVCodePage (TVCodePage)</a>
<li><a href="#UnicodeForInternalCode (TVCodePage)">UnicodeForInternalCode (TVCodePage)</a>
<li><a href="#~TVCodePage (TVCodePage)">~TVCodePage (TVCodePage)</a>
</Menu>



<p><hr></p>
<a name="Config File"></a>
<H1>Config File</H1>

This module provides the TVConfigFile class. This class can load a
configuration file containing sections and variables. Each section have
a name which is indicated using brackets [Name]. As sections can be nested
and my text editor can indent using the braces as reference (also jump to
the start/end of a block and highlight the pair) the section's body must
be enclosed using braces. Sections can be nested conforming an structure
that resembles a file system. Inside a section you can define variables. A
variable name must be composed of a-zA-Z_0-9 characters. After the name, and
in the same line, an equal sign must be put. The value after the equal sign
can be a number (decimal, octal or hexadecimal as in C) or a string enclosed
using double quotes. You can use spaces around the equal sign and after the
value but you must finish a definition in one line. Comments are started
with a # symbol and ends at the end of the line.
<p>

  The information from a configuration file is stored in memory as a tree.
You can search in the tree some key indicating it as a you indicate a path
and file name. Just think it as a particular file system, just use forward
slashes.

<Menu>
<li><a href="#Add (TVMainConfigFile)">Add (TVMainConfigFile)</a>
<li><a href="#Add (TVMainConfigFile) <1>">Add (TVMainConfigFile) <1></a>
<li><a href="#AddInt (TVConfigFile)">AddInt (TVConfigFile)</a>
<li><a href="#AddString (TVConfigFile)">AddString (TVConfigFile)</a>
<li><a href="#Load (TVConfigFile)">Load (TVConfigFile)</a>
<li><a href="#Load (TVMainConfigFile)">Load (TVMainConfigFile)</a>
<li><a href="#Print (TVConfigFile)">Print (TVConfigFile)</a>
<li><a href="#Print (TVMainConfigFile)">Print (TVMainConfigFile)</a>
<li><a href="#Search (TVConfigFile)">Search (TVConfigFile)</a>
<li><a href="#Search (TVMainConfigFile)">Search (TVMainConfigFile)</a>
<li><a href="#Search (TVMainConfigFile) <1>">Search (TVMainConfigFile) <1></a>
<li><a href="#Search (TVMainConfigFile) <2>">Search (TVMainConfigFile) <2></a>
<li><a href="#Search (TVMainConfigFile) <3>">Search (TVMainConfigFile) <3></a>
<li><a href="#SetUserConfigFile (TVMainConfigFile)">SetUserConfigFile (TVMainConfigFile)</a>
<li><a href="#TVConfigFile (TVConfigFile)">TVConfigFile (TVConfigFile)</a>
<li><a href="#TVMainConfigFile (TVMainConfigFile)">TVMainConfigFile (TVMainConfigFile)</a>
<li><a href="#~TVConfigFile (TVConfigFile)">~TVConfigFile (TVConfigFile)</a>
<li><a href="#~TVMainConfigFile (TVMainConfigFile)">~TVMainConfigFile (TVMainConfigFile)</a>
</Menu>



<p><hr></p>
<a name="Display"></a>
<H1>Display</H1>

This is the base class for low level screen output.
  Most members are pointers to functions defined by each platform dependent
driver. Default members are provided.
  This is a complete new file created from concepts that Jos&eacute; Angel Sanchez
Caso provide me and coded from scratch. The names of some members are the
same used in original Turbo Vision for compatibility purposes.

<Menu>
<li><a href="#defaultCheckForWindowSize (TDisplay)">defaultCheckForWindowSize (TDisplay)</a>
<li><a href="#defaultClearScreen (TDisplay)">defaultClearScreen (TDisplay)</a>
<li><a href="#defaultGetBlinkState (TDisplay)">defaultGetBlinkState (TDisplay)</a>
<li><a href="#defaultGetCols (TDisplay)">defaultGetCols (TDisplay)</a>
<li><a href="#defaultGetCrtMode (TDisplay)">defaultGetCrtMode (TDisplay)</a>
<li><a href="#defaultGetCursorShape (TDisplay)">defaultGetCursorShape (TDisplay)</a>
<li><a href="#defaultGetRows (TDisplay)">defaultGetRows (TDisplay)</a>
<li><a href="#defaultGetWindowTitle (TDisplay)">defaultGetWindowTitle (TDisplay)</a>
<li><a href="#defaultSetCrtMode (TDisplay)">defaultSetCrtMode (TDisplay)</a>
<li><a href="#defaultSetCrtModeExt (TDisplay)">defaultSetCrtModeExt (TDisplay)</a>
<li><a href="#defaultSetCrtModeRes (TDisplay)">defaultSetCrtModeRes (TDisplay)</a>
<li><a href="#defaultSetCursorShape (TDisplay)">defaultSetCursorShape (TDisplay)</a>
<li><a href="#defaultSetWindowTitle (TDisplay)">defaultSetWindowTitle (TDisplay)</a>
<li><a href="#searchDOSModeInfo (TDisplay)">searchDOSModeInfo (TDisplay)</a>
<li><a href="#setCursorType (TDisplay)">setCursorType (TDisplay)</a>
</Menu>



<p><hr></p>
<a name="DOS Display"></a>
<H1>DOS Display</H1>

This module implements the low level DOS screen access.
<p>


  Todo:<br>
  * The palette map could be changed during suspend. Currently not
  suported. But is a really bizarre case and is restored if VGA state saving
  is used.

<Menu>
<li><a href="#GetWindowTitle (TDisplayDOS)">GetWindowTitle (TDisplayDOS)</a>
<li><a href="#SetCrtMode (TDisplayDOS)">SetCrtMode (TDisplayDOS)</a>
<li><a href="#SetWindowTitle (TDisplayDOS)">SetWindowTitle (TDisplayDOS)</a>
<li><a href="#testForSupport (TDisplayDOS)">testForSupport (TDisplayDOS)</a>
</Menu>



<p><hr></p>
<a name="OS Clipboard"></a>
<H1>OS Clipboard</H1>

OS independent clipboard system class. Uses to access the OS clipboard.<br>
  It was created to abstract the X11 and Windows clipboards.

<Menu>
</Menu>



<p><hr></p>
<a name="Screen"></a>
<H1>Screen</H1>

This is the base class for medium level screen output.
  Most members are pointers to functions defined by each platform dependent
driver. Default members are provided.
  This is a complete new file created from concepts that Jos&eacute; Angel Sanchez
Caso provide me and coded from scratch. The names of some members are the
same used in original Turbo Vision for compatibility purposes.

<Menu>
<li><a href="#TScreen (TScreen)">TScreen (TScreen)</a>
</Menu>



<p><hr></p>
<a name="TVFontCollection"></a>
<H1>TVFontCollection</H1>

This module handles collections of 8xN bitmaped fonts useful for text
consoles. The collection is created from a fonts files. Each item is a font
of certain height. The collection can return interpolated and extrapolated
fonts in a range of +/- one from the available fonts. The fonts file should
contain fonts with all the supported symbols.
<p>


<pre>
  SFT Files: This is currently platform dependent! It means SFT files should
  be generated in the same platform they are used. It will be fixed in the
  future.

  17 bytes: SET's editor font
   1 byte:  26 (DOS EOF)
      int:  version (1 or 2)
      int:  number of fonts contained.
   2 bytes: size of name
            the name, the length includes the EOS, but this isn't stored on
            disk.

  Here are the fonts, each one have this format:
  version 1:
  int: first symbol defined.
  int: last symbol defined.
  unsigned: height of the font.
  The width is assumed to be 8 pixels (1 byte)

  version 2, the same but adds:
  unsigned: width of the font.

  The fonts itself follows the internal code.
</pre>

<Menu>
<li><a href="#CheckForLines (TVFontCollection)">CheckForLines (TVFontCollection)</a>
<li><a href="#CheckSignature (TVFontCollection)">CheckSignature (TVFontCollection)</a>
<li><a href="#CreateFont (TVFontCollection)">CreateFont (TVFontCollection)</a>
<li><a href="#CreateListOfFonts (TVFontCollection)">CreateListOfFonts (TVFontCollection)</a>
<li><a href="#EnlargeOne (TVFontCollection)">EnlargeOne (TVFontCollection)</a>
<li><a href="#freeItem (TVFontCollection)">freeItem (TVFontCollection)</a>
<li><a href="#GetFont (TVFontCollection)">GetFont (TVFontCollection)</a>
<li><a href="#ReadFontInfo (TVFontCollection)">ReadFontInfo (TVFontCollection)</a>
<li><a href="#ReadName (TVFontCollection)">ReadName (TVFontCollection)</a>
<li><a href="#ReadVersionNum (TVFontCollection)">ReadVersionNum (TVFontCollection)</a>
<li><a href="#ReduceOne (TVFontCollection)">ReduceOne (TVFontCollection)</a>
<li><a href="#SetCodePage (TVFontCollection)">SetCodePage (TVFontCollection)</a>
<li><a href="#TVFontCollection (TVFontCollection)">TVFontCollection (TVFontCollection)</a>
</Menu>



<p><hr></p>
<a name="Files"></a>
<H1>Files</H1>

<Menu>
<li><a href="#codepage.cc">codepage.cc</a>
<li><a href="#configfile.cc">configfile.cc</a>
<li><a href="#dosdis.cc">dosdis.cc</a>
<li><a href="#fontcoll.cc">fontcoll.cc</a>
<li><a href="#tdisplay.cc">tdisplay.cc</a>
<li><a href="#tdrawbuf.cc">tdrawbuf.cc</a>
<li><a href="#tscreen.cc">tscreen.cc</a>
<li><a href="#xtermkey.cc">xtermkey.cc</a>
</Menu>


<p><hr></p>
<a name="codepage.cc"></a>
<H1>codepage.cc</H1>



<Menu>
<li><a href="#AddCodePage (TVCodePage)">AddCodePage (TVCodePage)</a>
<li><a href="#CodePageOfID (TVCodePage)">CodePageOfID (TVCodePage)</a>
<li><a href="#CreateCodePagesCol (TVCodePage)">CreateCodePagesCol (TVCodePage)</a>
<li><a href="#CreateCPFromUnicode (TVCodePage)">CreateCPFromUnicode (TVCodePage)</a>
<li><a href="#CreateOnTheFlyInpRemap (TVCodePage)">CreateOnTheFlyInpRemap (TVCodePage)</a>
<li><a href="#CreateOnTheFlyRemap (TVCodePage)">CreateOnTheFlyRemap (TVCodePage)</a>
<li><a href="#CreateRemap (TVCodePage)">CreateRemap (TVCodePage)</a>
<li><a href="#FillTables (TVCodePage)">FillTables (TVCodePage)</a>
<li><a href="#GetList (TVCodePage)">GetList (TVCodePage)</a>
<li><a href="#GetTranslate (TVCodePage)">GetTranslate (TVCodePage)</a>
<li><a href="#IDToIndex (TVCodePage)">IDToIndex (TVCodePage)</a>
<li><a href="#IndexToID (TVCodePage)">IndexToID (TVCodePage)</a>
<li><a href="#InternalCodeForUnicode (TVCodePage)">InternalCodeForUnicode (TVCodePage)</a>
<li><a href="#LookSimilarInRange (TVCodePage)">LookSimilarInRange (TVCodePage)</a>
<li><a href="#RemapBufferGeneric (TVCodePage)">RemapBufferGeneric (TVCodePage)</a>
<li><a href="#RemapChar (TVCodePage)">RemapChar (TVCodePage)</a>
<li><a href="#RemapNString (TVCodePage)">RemapNString (TVCodePage)</a>
<li><a href="#RemapString (TVCodePage)">RemapString (TVCodePage)</a>
<li><a href="#RemapTVStrings (TVCodePage)">RemapTVStrings (TVCodePage)</a>
<li><a href="#SetCallBack (TVCodePage)">SetCallBack (TVCodePage)</a>
<li><a href="#SetCodePage (TVCodePage)">SetCodePage (TVCodePage)</a>
<li><a href="#TVCodePage (TVCodePage)">TVCodePage (TVCodePage)</a>
<li><a href="#UnicodeForInternalCode (TVCodePage)">UnicodeForInternalCode (TVCodePage)</a>
<li><a href="#~TVCodePage (TVCodePage)">~TVCodePage (TVCodePage)</a>
</Menu>



<p><hr></p>
<a name="configfile.cc"></a>
<H1>configfile.cc</H1>



<Menu>
<li><a href="#Add (TVMainConfigFile)">Add (TVMainConfigFile)</a>
<li><a href="#Add (TVMainConfigFile) <1>">Add (TVMainConfigFile) <1></a>
<li><a href="#AddInt (TVConfigFile)">AddInt (TVConfigFile)</a>
<li><a href="#AddString (TVConfigFile)">AddString (TVConfigFile)</a>
<li><a href="#Load (TVConfigFile)">Load (TVConfigFile)</a>
<li><a href="#Load (TVMainConfigFile)">Load (TVMainConfigFile)</a>
<li><a href="#Print (TVConfigFile)">Print (TVConfigFile)</a>
<li><a href="#Print (TVMainConfigFile)">Print (TVMainConfigFile)</a>
<li><a href="#Search (TVConfigFile)">Search (TVConfigFile)</a>
<li><a href="#Search (TVMainConfigFile)">Search (TVMainConfigFile)</a>
<li><a href="#Search (TVMainConfigFile) <1>">Search (TVMainConfigFile) <1></a>
<li><a href="#Search (TVMainConfigFile) <2>">Search (TVMainConfigFile) <2></a>
<li><a href="#Search (TVMainConfigFile) <3>">Search (TVMainConfigFile) <3></a>
<li><a href="#SetUserConfigFile (TVMainConfigFile)">SetUserConfigFile (TVMainConfigFile)</a>
<li><a href="#TVConfigFile (TVConfigFile)">TVConfigFile (TVConfigFile)</a>
<li><a href="#TVMainConfigFile (TVMainConfigFile)">TVMainConfigFile (TVMainConfigFile)</a>
<li><a href="#~TVConfigFile (TVConfigFile)">~TVConfigFile (TVConfigFile)</a>
<li><a href="#~TVMainConfigFile (TVMainConfigFile)">~TVMainConfigFile (TVMainConfigFile)</a>
</Menu>



<p><hr></p>
<a name="dosdis.cc"></a>
<H1>dosdis.cc</H1>



<Menu>
<li><a href="#GetWindowTitle (TDisplayDOS)">GetWindowTitle (TDisplayDOS)</a>
<li><a href="#SetCrtMode (TDisplayDOS)">SetCrtMode (TDisplayDOS)</a>
<li><a href="#SetWindowTitle (TDisplayDOS)">SetWindowTitle (TDisplayDOS)</a>
<li><a href="#testForSupport (TDisplayDOS)">testForSupport (TDisplayDOS)</a>
</Menu>



<p><hr></p>
<a name="fontcoll.cc"></a>
<H1>fontcoll.cc</H1>



<Menu>
<li><a href="#CheckForLines (TVFontCollection)">CheckForLines (TVFontCollection)</a>
<li><a href="#CheckSignature (TVFontCollection)">CheckSignature (TVFontCollection)</a>
<li><a href="#CreateFont (TVFontCollection)">CreateFont (TVFontCollection)</a>
<li><a href="#CreateListOfFonts (TVFontCollection)">CreateListOfFonts (TVFontCollection)</a>
<li><a href="#EnlargeOne (TVFontCollection)">EnlargeOne (TVFontCollection)</a>
<li><a href="#freeItem (TVFontCollection)">freeItem (TVFontCollection)</a>
<li><a href="#GetFont (TVFontCollection)">GetFont (TVFontCollection)</a>
<li><a href="#ReadFontInfo (TVFontCollection)">ReadFontInfo (TVFontCollection)</a>
<li><a href="#ReadName (TVFontCollection)">ReadName (TVFontCollection)</a>
<li><a href="#ReadVersionNum (TVFontCollection)">ReadVersionNum (TVFontCollection)</a>
<li><a href="#ReduceOne (TVFontCollection)">ReduceOne (TVFontCollection)</a>
<li><a href="#SetCodePage (TVFontCollection)">SetCodePage (TVFontCollection)</a>
<li><a href="#TVFontCollection (TVFontCollection)">TVFontCollection (TVFontCollection)</a>
</Menu>



<p><hr></p>
<a name="tdisplay.cc"></a>
<H1>tdisplay.cc</H1>



<Menu>
<li><a href="#defaultCheckForWindowSize (TDisplay)">defaultCheckForWindowSize (TDisplay)</a>
<li><a href="#defaultClearScreen (TDisplay)">defaultClearScreen (TDisplay)</a>
<li><a href="#defaultGetBlinkState (TDisplay)">defaultGetBlinkState (TDisplay)</a>
<li><a href="#defaultGetCols (TDisplay)">defaultGetCols (TDisplay)</a>
<li><a href="#defaultGetCrtMode (TDisplay)">defaultGetCrtMode (TDisplay)</a>
<li><a href="#defaultGetCursorShape (TDisplay)">defaultGetCursorShape (TDisplay)</a>
<li><a href="#defaultGetRows (TDisplay)">defaultGetRows (TDisplay)</a>
<li><a href="#defaultGetWindowTitle (TDisplay)">defaultGetWindowTitle (TDisplay)</a>
<li><a href="#defaultSetCrtMode (TDisplay)">defaultSetCrtMode (TDisplay)</a>
<li><a href="#defaultSetCrtModeExt (TDisplay)">defaultSetCrtModeExt (TDisplay)</a>
<li><a href="#defaultSetCrtModeRes (TDisplay)">defaultSetCrtModeRes (TDisplay)</a>
<li><a href="#defaultSetCursorShape (TDisplay)">defaultSetCursorShape (TDisplay)</a>
<li><a href="#defaultSetWindowTitle (TDisplay)">defaultSetWindowTitle (TDisplay)</a>
<li><a href="#searchDOSModeInfo (TDisplay)">searchDOSModeInfo (TDisplay)</a>
<li><a href="#setCursorType (TDisplay)">setCursorType (TDisplay)</a>
</Menu>



<p><hr></p>
<a name="tdrawbuf.cc"></a>
<H1>tdrawbuf.cc</H1>



<Menu>
<li><a href="#moveBuf (TDrawBuffer)">moveBuf (TDrawBuffer)</a>
<li><a href="#moveChar (TDrawBuffer)">moveChar (TDrawBuffer)</a>
<li><a href="#moveCStr (TDrawBuffer)">moveCStr (TDrawBuffer)</a>
<li><a href="#moveStr (TDrawBuffer)">moveStr (TDrawBuffer)</a>
</Menu>



<p><hr></p>
<a name="tscreen.cc"></a>
<H1>tscreen.cc</H1>



<Menu>
<li><a href="#TScreen (TScreen)">TScreen (TScreen)</a>
</Menu>



<p><hr></p>
<a name="xtermkey.cc"></a>
<H1>xtermkey.cc</H1>



<Menu>
<li><a href="#FillTEvent (TGKeyXTerm)">FillTEvent (TGKeyXTerm)</a>
<li><a href="#GetKeyParsed (TGKeyXTerm)">GetKeyParsed (TGKeyXTerm)</a>
<li><a href="#GetRaw (TGKeyXTerm)">GetRaw (TGKeyXTerm)</a>
<li><a href="#GetShiftState (TGKeyXTerm)">GetShiftState (TGKeyXTerm)</a>
<li><a href="#GKey (TGKeyXTerm)">GKey (TGKeyXTerm)</a>
<li><a href="#InitOnce (TGKeyXTerm)">InitOnce (TGKeyXTerm)</a>
<li><a href="#ProcessEscape (TGKeyXTerm)">ProcessEscape (TGKeyXTerm)</a>
<li><a href="#Resume (TGKeyXTerm)">Resume (TGKeyXTerm)</a>
<li><a href="#Suspend (TGKeyXTerm)">Suspend (TGKeyXTerm)</a>
</Menu>





<p><hr></p>
<a name="CreateCodePagesCol (TVCodePage)"></a>
<center><Font Size=+2>CreateCodePagesCol</Font> (codepage.cc 1265)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::CreateCodePagesCol();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Protected member used to create the list of known code pages stored in
CodePages.
<p>




<p><hr></p>
<a name="TVCodePage (TVCodePage)"></a>
<center><Font Size=+2>TVCodePage</Font> (codepage.cc 1332)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::TVCodePage(int idApp, int idScr, int idInp);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Initializes the code page system selecting the indicated code pages. This
is only used iternally. <a href="#SetCodePage (TVCodePage)">SetCodePage</a>.
<p>




<p><hr></p>
<a name="CreateRemap (TVCodePage)"></a>
<center><Font Size=+2>CreateRemap</Font> (codepage.cc 1358)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::CreateRemap(int idSource, int idDest, uchar *table);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Protected member used to create a one to one table to convert from one
code page to another. Used to create the input to application and application
to screen on the fly convertion tables.
<p>




<p><hr></p>
<a name="CreateOnTheFlyRemap (TVCodePage)"></a>
<center><Font Size=+2>CreateOnTheFlyRemap</Font> (codepage.cc 1416)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::CreateOnTheFlyRemap(int idApp, int idScr);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Protected member used to create the application to screen map when we have
to translate values on the fly. <a href="#CreateRemap (TVCodePage)">CreateRemap</a>.
<p>




<p><hr></p>
<a name="CreateOnTheFlyInpRemap (TVCodePage)"></a>
<center><Font Size=+2>CreateOnTheFlyInpRemap</Font> (codepage.cc 1444)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::CreateOnTheFlyInpRemap(int idInp, int idApp);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Protected member used to create the input to application map when we have
to translate values on the fly. <a href="#CreateRemap (TVCodePage)">CreateRemap</a>.
<p>




<p><hr></p>
<a name="SetCodePage (TVCodePage)"></a>
<center><Font Size=+2>SetCodePage</Font> (codepage.cc 1467)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::SetCodePage(int idApp, int idScr, int idInp);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Selects the current code page used for toupper, tolower, etc. operations
and internal encodings, the code page used for the screen and the one used
for input.
<p>

  If any of the arguments is -1 the current value is used. If the code pages
aren't the same the remap on the fly is enabled. The application code page
is used to remap the application, only if it changed.
<p>




<p><hr></p>
<a name="FillTables (TVCodePage)"></a>
<center><Font Size=+2>FillTables</Font> (codepage.cc 1497)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::FillTables(int id);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Protected member used to create the toupper, tolower and isalpha tables.
<p>




<p><hr></p>
<a name="~TVCodePage (TVCodePage)"></a>
<center><Font Size=+2>~TVCodePage</Font> (codepage.cc 1566)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::~TVCodePage();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Deallocates memory used by TVCodePage.
<p>




<p><hr></p>
<a name="IDToIndex (TVCodePage)"></a>
<center><Font Size=+2>IDToIndex</Font> (codepage.cc 1582)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::IDToIndex(int id);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Converts a code page id into an index in the code page collection.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The index of the code page with this id. If error the index for
PC 437 code page is returned.
<p>



<p><hr></p>
<a name="IndexToID (TVCodePage)"></a>
<center><Font Size=+2>IndexToID</Font> (codepage.cc 1606)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::IndexToID(ccIndex index);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Converts an index in the code page collection into a code page id. No
check of range is done.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The code page id for the indicated index.
<p>



<p><hr></p>
<a name="GetTranslate (TVCodePage)"></a>
<center><Font Size=+2>GetTranslate</Font> (codepage.cc 1626)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::GetTranslate(int id);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Used to get a map to translate code page symbols into internal symbols for
the indicated code page id.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

A pointer to a static buffer containing the translation values. Or
NULL if not initialized. The index 256 indicates 128 if only the upper 128
values are really different from CP 437 or 256 if all the values are
different. In any case all the values are usable.
<p>



<p><hr></p>
<a name="GetList (TVCodePage)"></a>
<center><Font Size=+2>GetList</Font> (codepage.cc 1657)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::GetList(void);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Used to get a TStringCollection listing all the available code pages.
Useful to make the user choose one. This is a read-only value, don't modify
it.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The internal collection casted to TStringCollection.
<p>



<p><hr></p>
<a name="RemapChar (TVCodePage)"></a>
<center><Font Size=+2>RemapChar</Font> (codepage.cc 1673)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::RemapChar(uchar c, ushort *map);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Remaps the desired character using the provided map. The original character
should be in CP437 encoding. <a href="#GetTranslate (TVCodePage)">GetTranslate</a>.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The remapped character. It can be a direct translation or the
closest found.
<p>



<p><hr></p>
<a name="RemapString (TVCodePage)"></a>
<center><Font Size=+2>RemapString</Font> (codepage.cc 1703)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::RemapString(uchar *n, uchar *o, ushort *map);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Remaps the <b>o</b> string using the provided map and storing it in the
<b>n</b> string. The string should be terminated by a 0. <a href="#RemapChar (TVCodePage)">RemapChar</a>.
<p>




<p><hr></p>
<a name="RemapNString (TVCodePage)"></a>
<center><Font Size=+2>RemapNString</Font> (codepage.cc 1719)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::RemapNString(uchar *n, uchar *o, ushort *map, int len);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Remaps the @var{o} string using the provided map and storing it in the
@var{n} string. The number of items to remap is indicated with @var{len}.
<a href="#RemapChar (TVCodePage)">RemapChar</a>.
<p>




<p><hr></p>
<a name="RemapBufferGeneric (TVCodePage)"></a>
<center><Font Size=+2>RemapBufferGeneric</Font> (codepage.cc 1734)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::RemapBufferGeneric(int sourID, int destID, uchar *buffer, unsigned len, unsigned ops);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Used to remap a buffer from any of the supported code pages into another.
The process doesn't have to be reversible.
<p>

  Tabs, carriage returns, new lines and the null code aren't remapped.
<p>




<p><hr></p>
<a name="RemapTVStrings (TVCodePage)"></a>
<center><Font Size=+2>RemapTVStrings</Font> (codepage.cc 1815)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::RemapTVStrings(ushort *map);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Protected member used internally to remap all the TV stuff that isn't
ASCII.
<p>




<p><hr></p>
<a name="SetCallBack (TVCodePage)"></a>
<center><Font Size=+2>SetCallBack</Font> (codepage.cc 1873)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::SetCallBack(TVCodePageCallBack cb);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the function to be called after changing the code page. This should
remap the special strings used by the application.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The previous function. If it's != NULL you should call it.
<p>



<p><hr></p>
<a name="CodePageOfID (TVCodePage)"></a>
<center><Font Size=+2>CodePageOfID</Font> (codepage.cc 1889)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::CodePageOfID(int id);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Protected member used to find the code page structure for a provided id.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

A CodePage structure pointer.
<p>



<p><hr></p>
<a name="UnicodeForInternalCode (TVCodePage)"></a>
<center><Font Size=+2>UnicodeForInternalCode</Font> (codepage.cc 2567)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::UnicodeForInternalCode(uint16 value);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Finds which unicode is represented by the specified internal code.
Currently that's an slow search because isn't very.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The first unicode found.
<p>



<p><hr></p>
<a name="InternalCodeForUnicode (TVCodePage)"></a>
<center><Font Size=+2>InternalCodeForUnicode</Font> (codepage.cc 2593)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::InternalCodeForUnicode(ushort unicode);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Finds which internal code can render an Unicode value.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The internal or -1 if none can do it.
<p>



<p><hr></p>
<a name="CreateCPFromUnicode (TVCodePage)"></a>
<center><Font Size=+2>CreateCPFromUnicode</Font> (codepage.cc 2610)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::CreateCPFromUnicode(CodePage *cp, int id, const char *name, ushort *unicodes);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Creates a new code page from an arry containing the unicodes for each
symbol. Use an id over than 0x7FFF8000 to avoid collisions. This is used by
the Linux driver when the unicodes maps doesn't match with known cp.
<p>




<p><hr></p>
<a name="AddCodePage (TVCodePage)"></a>
<center><Font Size=+2>AddCodePage</Font> (codepage.cc 2649)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::AddCodePage(CodePage *cp);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

Adds a custom code page to the list. You can create a new one from an
array containing the Unicodes for each symbol. <a href="#CreateCPFromUnicode (TVCodePage)">CreateCPFromUnicode</a>.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The index of the new code page in the collection.
<p>



<p><hr></p>
<a name="LookSimilarInRange (TVCodePage)"></a>
<center><Font Size=+2>LookSimilarInRange</Font> (codepage.cc 2668)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVCodePage
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVCodePage::LookSimilarInRange(int code, int last);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVCodePage
<p>



<Font Size=+1><u>Description</u></Font><p>

This is a helper for the TVFontCollection class the parameters of this
function could change in the future.<br>
  Basically it finds a replacement for a missing symbol in a font. It allows
using incomplete font.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The replacement or -1 if none known.
<p>



<p><hr></p>
<a name="TVConfigFile (TVConfigFile)"></a>
<center><Font Size=+2>TVConfigFile</Font> (configfile.cc 66)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVConfigFile::TVConfigFile();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Initializes the class and reads the contents of the specified file to a
tree in memory.
<p>




<p><hr></p>
<a name="Search (TVConfigFile)"></a>
<center><Font Size=+2>Search</Font> (configfile.cc 86)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVConfigFile::Search(const char *key, char *&p, long &n);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Searchs for the indicated key in the tree. Separate nested sections using
forward slashes.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

not 0 if the key was found, the return value is in <b>p</b> if
the key is an string. Otherwise <b>p</b> is NULL and the value is in
<b>n</b>.
<p>



<p><hr></p>
<a name="AddInt (TVConfigFile)"></a>
<center><Font Size=+2>AddInt</Font> (configfile.cc 530)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVConfigFile::AddInt(const char *key, const char *name, long value, int priority);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Adds a new variable to the tree. The type of the variable is integer. The
<b>name</b> variable is added to the section indicated by <b>key</b>.
Possible priority values are justHint (25), fromFile (50) or fromApplication
(75). It is used to determine if a current value should be replaced by the
new value. The name is copied.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

!=0 if the variable was added.
<p>


<Font Size=+1><u>Example</u></Font><p>

TVConfigFile::AddInt("TV/X11","ScreenWidth",90,
TVConfigFile::fromFile)
<p>


<p><hr></p>
<a name="AddString (TVConfigFile)"></a>
<center><Font Size=+2>AddString</Font> (configfile.cc 562)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVConfigFile::AddString(const char *key, const char *name, const char *value, int priority);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Adds a new variable to the tree. The type of the variable is string. The
<b>name</b> variable is added to the section indicated by <b>key</b>.
Possible priority values are justHint (25), fromFile (50) or fromApplication
(75). It is used to determine if a current value should be replaced by the
new value. The name and the content are copied.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

!=0 if the variable was added.
<p>


<Font Size=+1><u>Example</u></Font><p>

TVConfigFile::AddInt("TV/X11","ExtProgVideoMode","A_Program",
TVConfigFile::fromFile)
<p>


<p><hr></p>
<a name="Print (TVConfigFile)"></a>
<center><Font Size=+2>Print</Font> (configfile.cc 651)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVConfigFile::Print(FILE *f);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Prints the current tree to the specified file. It's main purpose is to
debug programs, but you can use it to generate valid configuration files
from data found in memory.
<p>




<p><hr></p>
<a name="~TVConfigFile (TVConfigFile)"></a>
<center><Font Size=+2>~TVConfigFile</Font> (configfile.cc 665)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 ~TVConfigFile();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

This is the destructor and just releases the tree that contains the
variables.
<p>




<p><hr></p>
<a name="Load (TVConfigFile)"></a>
<center><Font Size=+2>Load</Font> (configfile.cc 672)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 int Load(const char *file);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Reads the specified configuration file.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The read status, 0 means no error. The <b>Errors</b> data member
contains descriptions for the errors.
<p>



<p><hr></p>
<a name="TVMainConfigFile (TVMainConfigFile)"></a>
<center><Font Size=+2>TVMainConfigFile</Font> (configfile.cc 694)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::TVMainConfigFile();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

This is the constructor for TVMainConfigFile. This class is a special case
of TVConfigFile used for the Turbo Vision configuration file. Note you can
store application specific information in the configuration file using a
section different than TV.
<p>




<p><hr></p>
<a name="Load (TVMainConfigFile)"></a>
<center><Font Size=+2>Load</Font> (configfile.cc 713)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::Load();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Loads the configuration file. First we try using the application provided
name, then we search in the current directory, the path indicated by the
HOME environment variable, the path indicated by the HOMEDIR environment
variable, /etc and /dev/env/DJDIR/etc (%DJDIR%/etc). The default name for
the file is tvrc, if the OS uses a point in the name to make it a hidden file
the library also tries with .tvrc.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The error status. 0 is OK.
<p>



<p><hr></p>
<a name="~TVMainConfigFile (TVMainConfigFile)"></a>
<center><Font Size=+2>~TVMainConfigFile</Font> (configfile.cc 764)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::~TVMainConfigFile();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Destroys the global TVConfigFile that contains the configuration.
<p>




<p><hr></p>
<a name="Search (TVMainConfigFile)"></a>
<center><Font Size=+2>Search</Font> (configfile.cc 802)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::Search(const char *key, long &val);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Looks for the specified key in the TV section. If found the result is
stored in <b>val</b>, but only if that's an integer.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

True if the key exists, even when that's an string.
<p>



<p><hr></p>
<a name="Search (TVMainConfigFile) <1>"></a>
<center><Font Size=+2>Search</Font> (configfile.cc 823)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::Search(const char *section, const char *variable, long &val);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Looks for the specified @var{variable} in the TV section using the
specified @var{section} as subsection. If found the result is
stored in <b>val</b>, but only if that's an integer.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

True if the key exists, even when that's an string.
<p>



<p><hr></p>
<a name="Search (TVMainConfigFile) <2>"></a>
<center><Font Size=+2>Search</Font> (configfile.cc 845)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::Search(const char *key);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Looks for the specified key in the TV section. If found the result is
returned but only if that's a string.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The string or NULL.
<p>



<p><hr></p>
<a name="Search (TVMainConfigFile) <3>"></a>
<center><Font Size=+2>Search</Font> (configfile.cc 867)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::Search(const char *section, const char *variable);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Looks for the specified @var{variable} in the TV section using the
specified @var{section} as subsection. If found the result is returned but
only if that's a string.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The string or NULL.
<p>



<p><hr></p>
<a name="Add (TVMainConfigFile)"></a>
<center><Font Size=+2>Add</Font> (configfile.cc 891)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::Add(const char *section, const char *name, long value);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Adds a new variable of integer type to the TV subtree in the specified
<b>section</b> and using the specified <b>name</b>. The priority for this
variable is TVConfigFile::fromApplication. <a href="#AddInt (TVConfigFile)">AddInt</a>.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

!=0 if added.
<p>



<p><hr></p>
<a name="Add (TVMainConfigFile) <1>"></a>
<center><Font Size=+2>Add</Font> (configfile.cc 916)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TVMainConfigFile::Add(const char *section, const char *name, const char *value);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Adds a new variable of string type to the TV subtree in the specified
<b>section</b> and using the specified <b>name</b>. The priority for this
variable is TVConfigFile::fromApplication. The string is copied.
<a href="#AddInt (TVConfigFile)">AddInt</a>.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

!=0 if added.
<p>



<p><hr></p>
<a name="Print (TVMainConfigFile)"></a>
<center><Font Size=+2>Print</Font> (configfile.cc 941)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 void TVMainConfigFile::Print(FILE *f);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Prints the current tree to the specified file. It's main purpose is to
debug programs, but you can use it to generate valid configuration files
from data found in memory.
<p>




<p><hr></p>
<a name="SetUserConfigFile (TVMainConfigFile)"></a>
<center><Font Size=+2>SetUserConfigFile</Font> (configfile.cc 949)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TVConfigFile
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 void TVMainConfigFile::SetUserConfigFile(const char *name);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVMainConfigFile
<p>



<Font Size=+1><u>Description</u></Font><p>

Specifies a name and path for the configuration file. Use it
if your application needs special settings different than the rest of the
TV applications.
<p>




<p><hr></p>
<a name="testForSupport (TDisplayDOS)"></a>
<center><Font Size=+2>testForSupport</Font> (dosdis.cc 506)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDisplayDOS::testForSupport();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplayDOS
<p>



<Font Size=+1><u>Description</u></Font><p>

Used to test if a mode that we don't know can be handled by the driver
or not. If the mode uses an unknown memory region we just assume that's
a graphics mode and revert to 80x25. It could be enhanced a lot specially to
support VESA video modes when implemented in a way that the video memory
isn't located at the usual address.
<p>




<p><hr></p>
<a name="SetCrtMode (TDisplayDOS)"></a>
<center><Font Size=+2>SetCrtMode</Font> (dosdis.cc 549)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDisplayDOS::SetCrtMode(ushort mode);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplayDOS
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets a video mode from the video mode number. Video modes with the low
nibble equal 3 are used to encode extended and tweacked video modes. Note
that VESA 800x600x256 mode is 0x103 and here it is assumed to be extended
mode 1, that's 80x28. Also note that regular VGA 80x25 mode is the
"extended mode 0".<br>
  Any other value is assumed to be a user provided video mode and is
accepted only if we are sure that's really text mode and we know how to
handle it.
<p>




<p><hr></p>
<a name="GetWindowTitle (TDisplayDOS)"></a>
<center><Font Size=+2>GetWindowTitle</Font> (dosdis.cc 633)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDisplayDOS::GetWindowTitle(void);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplayDOS
<p>



<Font Size=+1><u>Description</u></Font><p>

Finds the main window title if we are running under W95 and windowed.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

A pointer to a newly allocated string (new[]). Or 0 if fail. by SET.
<p>



<p><hr></p>
<a name="SetWindowTitle (TDisplayDOS)"></a>
<center><Font Size=+2>SetWindowTitle</Font> (dosdis.cc 673)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDisplayDOS::SetWindowTitle(const char *name);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplayDOS
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the main window title if we are running under W95 and windowed.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

1 successful. by SET.
<p>



<p><hr></p>
<a name="freeItem (TVFontCollection)"></a>
<center><Font Size=+2>freeItem</Font> (fontcoll.cc 74)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::freeItem(void *item);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

A specialized free to free the memory used by the font structure.
<p>




<p><hr></p>
<a name="CheckForLines (TVFontCollection)"></a>
<center><Font Size=+2>CheckForLines</Font> (fontcoll.cc 93)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::CheckForLines(void *item, void *arg);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Internally used during searchs to look for a font that matchs a specified
size.
<p>




<p><hr></p>
<a name="ReduceOne (TVFontCollection)"></a>
<center><Font Size=+2>ReduceOne</Font> (fontcoll.cc 111)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::ReduceOne(uchar *dest, uchar *ori, int height, int wBytes, int num);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Creates a font of the specified height from another of the same height
plus one. The destination buffer should be large enough (num*height bytes).
Special care is taked for letters.
<p>




<p><hr></p>
<a name="EnlargeOne (TVFontCollection)"></a>
<center><Font Size=+2>EnlargeOne</Font> (fontcoll.cc 144)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::EnlargeOne(uchar *dest, uchar *ori, int height, int wBytes, int num);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Creates a font of the specified height from another of the same height
minus one. The destination buffer should be large enough (num*height bytes).
The last line is filled with 0.
<p>




<p><hr></p>
<a name="GetFont (TVFontCollection)"></a>
<center><Font Size=+2>GetFont</Font> (fontcoll.cc 174)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::GetFont(int width, int height);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>


<p>


<Font Size=+1><u>Return Value</u></Font><p>

NULL if the font isn't available.
<p>



<p><hr></p>
<a name="CheckSignature (TVFontCollection)"></a>
<center><Font Size=+2>CheckSignature</Font> (fontcoll.cc 218)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::CheckSignature(FILE *f);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Internally used to check if we opened a fonts file.
<p>




<p><hr></p>
<a name="ReadName (TVFontCollection)"></a>
<center><Font Size=+2>ReadName</Font> (fontcoll.cc 233)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::ReadName(FILE *f);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Internally used to get the font's name.
<p>




<p><hr></p>
<a name="ReadVersionNum (TVFontCollection)"></a>
<center><Font Size=+2>ReadVersionNum</Font> (fontcoll.cc 268)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::ReadVersionNum(FILE *f, int *version, int *numfonts);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Internally used to read the version and number of fonts in the file.
<p>




<p><hr></p>
<a name="ReadFontInfo (TVFontCollection)"></a>
<center><Font Size=+2>ReadFontInfo</Font> (fontcoll.cc 288)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::ReadFontInfo(FILE *f, int version, TVBitmapFont *p);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Internally used to read the information about a font contained in an SFT
file.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

Size of the data font.
<p>



<p><hr></p>
<a name="CreateFont (TVFontCollection)"></a>
<center><Font Size=+2>CreateFont</Font> (fontcoll.cc 315)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::CreateFont(void *item, void *arg);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Internally used to create a font for a desired code page.
<p>




<p><hr></p>
<a name="SetCodePage (TVFontCollection)"></a>
<center><Font Size=+2>SetCodePage</Font> (fontcoll.cc 360)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::SetCodePage(int id);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the encoding of the fonts returned by GetFont.
<p>




<p><hr></p>
<a name="TVFontCollection (TVFontCollection)"></a>
<center><Font Size=+2>TVFontCollection</Font> (fontcoll.cc 382)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::TVFontCollection(const char *file, int cp);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Creates a font collection from the specified file and using the specified
code page. You must check the error status with GetError before using the
collection.
<p>




<p><hr></p>
<a name="CreateListOfFonts (TVFontCollection)"></a>
<center><Font Size=+2>CreateListOfFonts</Font> (fontcoll.cc 449)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TVFontCollection::CreateListOfFonts(const char *dir, unsigned wmin, unsigned wmax, unsigned hmin, unsigned hmax);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TVFontCollection
<p>



<Font Size=+1><u>Description</u></Font><p>

Constructs a string collection of fonts files that provides shapes inside
the specified range. The fonts are searched in the specified directory. If
you specify NULL as directory then the search is done in the current
directory. Each element in the collection is a string that contains two
ASCIIZ strings. The first is the fantasy name of the font and the second is
the name of the file containing it. It is useful to display the name in
a TSortedListBox and easilly locate which file contains it using strlen.<br>
  This is an static member.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

The collection of available fonts or NULL if none.
<p>



<p><hr></p>
<a name="defaultGetCols (TDisplay)"></a>
<center><Font Size=+2>defaultGetCols</Font> (tdisplay.cc 139)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultGetCols();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Number of columns of the physical screen.
<p>




<p><hr></p>
<a name="defaultGetRows (TDisplay)"></a>
<center><Font Size=+2>defaultGetRows</Font> (tdisplay.cc 148)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultGetRows();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Number of rows of the physical screen.
<p>




<p><hr></p>
<a name="defaultClearScreen (TDisplay)"></a>
<center><Font Size=+2>defaultClearScreen</Font> (tdisplay.cc 157)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultClearScreen(uchar, uchar);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Erase the screen using this width and height.
<p>




<p><hr></p>
<a name="defaultSetCursorShape (TDisplay)"></a>
<center><Font Size=+2>defaultSetCursorShape</Font> (tdisplay.cc 165)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultSetCursorShape(unsigned, unsigned);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the cursor shape, values in percent.
<p>




<p><hr></p>
<a name="defaultGetCursorShape (TDisplay)"></a>
<center><Font Size=+2>defaultGetCursorShape</Font> (tdisplay.cc 173)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultGetCursorShape(unsigned &start, unsigned &end);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Gets the cursor shape, values in percent.
<p>




<p><hr></p>
<a name="searchDOSModeInfo (TDisplay)"></a>
<center><Font Size=+2>searchDOSModeInfo</Font> (tdisplay.cc 184)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::searchDOSModeInfo(ushort mode, unsigned &w, unsigned &h, int &fW, int &fH);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>


<p>


<Font Size=+1><u>Return Value</u></Font><p>

True if the mode is known.
<p>



<p><hr></p>
<a name="defaultSetCrtMode (TDisplay)"></a>
<center><Font Size=+2>defaultSetCrtMode</Font> (tdisplay.cc 204)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultSetCrtMode(ushort mode);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the video mode.
<p>




<p><hr></p>
<a name="defaultSetCrtModeExt (TDisplay)"></a>
<center><Font Size=+2>defaultSetCrtModeExt</Font> (tdisplay.cc 218)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultSetCrtModeExt(char *command);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the video mode using a string. It could be an external
program or other information that doesn't fit in an ushort.
<p>




<p><hr></p>
<a name="defaultSetCrtModeRes (TDisplay)"></a>
<center><Font Size=+2>defaultSetCrtModeRes</Font> (tdisplay.cc 231)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultSetCrtModeRes(unsigned, unsigned, int, int);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Selects the mode that's closest to the sepcified width and
height. The optional font size can be specified.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

0 no change done, 1 change done with all the requested parameters,
2 change done but just to get closer.
<p>



<p><hr></p>
<a name="defaultGetCrtMode (TDisplay)"></a>
<center><Font Size=+2>defaultGetCrtMode</Font> (tdisplay.cc 241)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultGetCrtMode();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Returns current video mode.
<p>




<p><hr></p>
<a name="defaultCheckForWindowSize (TDisplay)"></a>
<center><Font Size=+2>defaultCheckForWindowSize</Font> (tdisplay.cc 251)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultCheckForWindowSize(void);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Returns !=0 if the screen size changed externally. Usually
when we are in a window, but isn't the only case.
<p>




<p><hr></p>
<a name="defaultGetWindowTitle (TDisplay)"></a>
<center><Font Size=+2>defaultGetWindowTitle</Font> (tdisplay.cc 261)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultGetWindowTitle(void);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Gets the visible title of the screen, usually the window
title.
<p>




<p><hr></p>
<a name="defaultSetWindowTitle (TDisplay)"></a>
<center><Font Size=+2>defaultSetWindowTitle</Font> (tdisplay.cc 272)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultSetWindowTitle(const char *);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the visible title of the screen, usually the window
title.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

!=0 success.
<p>



<p><hr></p>
<a name="defaultGetBlinkState (TDisplay)"></a>
<center><Font Size=+2>defaultGetBlinkState</Font> (tdisplay.cc 282)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::defaultGetBlinkState();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Finds if the MSB of the attribute is for blinking.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

0 no, 1 yes, 2 no but is used for other thing.
<p>



<p><hr></p>
<a name="setCursorType (TDisplay)"></a>
<center><Font Size=+2>setCursorType</Font> (tdisplay.cc 326)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TDisplay
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TDisplay::setCursorType(ushort val);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDisplay
<p>



<Font Size=+1><u>Description</u></Font><p>

Sets the cursor shape. I take the TV 2.0 convention: the low 8 bits is
the start and the high 8 bits the end. Values can be between 0 and 99. To
disable the cursor a value of 0 is used.
<p>




<p><hr></p>
<a name="moveBuf (TDrawBuffer)"></a>
<center><Font Size=+2>moveBuf</Font> (tdrawbuf.cc 22)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDrawBuffer::moveBuf(unsigned indent, const void *source, unsigned attr, unsigned count);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDrawBuffer
<p>



<Font Size=+1><u>Description</u></Font><p>

Copies count bytes from source to the data buffer starting at indent. The
function uses the provided attribute, but if the attribute is 0 the attribute
in the buffer is unmodified.
<p>

  Added a check to avoid writings passing the end of the buffer.
<p>

<p>




<p><hr></p>
<a name="moveChar (TDrawBuffer)"></a>
<center><Font Size=+2>moveChar</Font> (tdrawbuf.cc 60)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDrawBuffer::moveChar(unsigned indent, char c, unsigned attr, unsigned count);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDrawBuffer
<p>



<Font Size=+1><u>Description</u></Font><p>

Fills count bytes in the buffer starting at the indent position. If the
attribute is 0 the original is left unchanged. If the character is 0 only
the attribute is used.
<p>

  Added a check to avoid writings passing the end of the buffer.
<p>

<p>




<p><hr></p>
<a name="moveCStr (TDrawBuffer)"></a>
<center><Font Size=+2>moveCStr</Font> (tdrawbuf.cc 110)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDrawBuffer::moveCStr(unsigned indent, const char *str, unsigned attrs);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDrawBuffer
<p>



<Font Size=+1><u>Description</u></Font><p>

That's the same as moveStr but the attrs parameter holds two attributes
the lower 8 bits are the normal value and the upper 8 bits define the
attribute to be used for text enclosed by ASCII 126. <a href="#moveStr (TDrawBuffer)">moveStr</a>.
<p>

  The routine was modified to avoid writes passing the end of the buffer.
Additionally was re-writed in assembler (I guess the Borland's original code
was assembler, but I didn't take a look to it) because the check slow downs
the routine so I wanted to avoid a lose in performance. SET.
<p>




<p><hr></p>
<a name="moveStr (TDrawBuffer)"></a>
<center><Font Size=+2>moveStr</Font> (tdrawbuf.cc 207)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TDrawBuffer::moveStr(unsigned indent, const char *str, unsigned attr);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TDrawBuffer
<p>



<Font Size=+1><u>Description</u></Font><p>

Writes a string in the buffer with the provided attribute. The routine
copies until the EOS is found or the buffer is filled.
<p>

  Modified to avoid writes passing the end of the buffer. Optimized for
32 bits. Translated to asm just for fun, I think is a little bit faster.
SET.
<p>




<p><hr></p>
<a name="TScreen (TScreen)"></a>
<center><Font Size=+2>TScreen</Font> (tscreen.cc 247)</center>

<Font Size=+1><u>Syntax</u></Font><p>


<pre>
 #define Uses_TScreen
 #include &lt;tv.h&gt;
 
</pre>


<pre>
 TScreen::TScreen();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TScreen
<p>



<Font Size=+1><u>Description</u></Font><p>

This constructor is called when the TApplication object is created. The
TProgramInit constructor creates a dynamic copy instance of a TScreen
object.<br>
  Actually it calls the detection routines to determine the best driver
available. If non is found prints and error to the stderr output and aborts
the execution.
<p>




<p><hr></p>
<a name="InitOnce (TGKeyXTerm)"></a>
<center><Font Size=+2>InitOnce</Font> (xtermkey.cc 72)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::InitOnce();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Does initialization tasks performed only once.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

0 if success, !=0 if an error ocurred. In the last case the error member
points to a descriptive error.
<p>



<p><hr></p>
<a name="Suspend (TGKeyXTerm)"></a>
<center><Font Size=+2>Suspend</Font> (xtermkey.cc 138)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::Suspend();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Restore the original console state.
<p>




<p><hr></p>
<a name="Resume (TGKeyXTerm)"></a>
<center><Font Size=+2>Resume</Font> (xtermkey.cc 152)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::Resume();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Memorize current console state and setup the one needed for us.
<p>




<p><hr></p>
<a name="ProcessEscape (TGKeyXTerm)"></a>
<center><Font Size=+2>ProcessEscape</Font> (xtermkey.cc 611)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::ProcessEscape();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Parse a escape sequence.
<p>


<Font Size=+1><u>Return Value</u></Font><p>

: 1 if the sequence found, 0 if not and the keys are stored in the
buffer.
<p>



<p><hr></p>
<a name="GetKeyParsed (TGKeyXTerm)"></a>
<center><Font Size=+2>GetKeyParsed</Font> (xtermkey.cc 677)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::GetKeyParsed();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Gets a key from the buffer, waiting value or fIn and if needed calls
the escape sequence parser.
<p>




<p><hr></p>
<a name="GetRaw (TGKeyXTerm)"></a>
<center><Font Size=+2>GetRaw</Font> (xtermkey.cc 717)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::GetRaw();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Gets the next key, their modifiers and ASCII. Is a postprocessor for
GetKeyParsed.
<p>




<p><hr></p>
<a name="GKey (TGKeyXTerm)"></a>
<center><Font Size=+2>GKey</Font> (xtermkey.cc 750)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::GKey();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Gets a key from the input and converts it into the TV format.
<p>




<p><hr></p>
<a name="GetShiftState (TGKeyXTerm)"></a>
<center><Font Size=+2>GetShiftState</Font> (xtermkey.cc 783)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::GetShiftState();
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Finds the value of the modifiers in TV format.
<p>




<p><hr></p>
<a name="FillTEvent (TGKeyXTerm)"></a>
<center><Font Size=+2>FillTEvent</Font> (xtermkey.cc 809)</center>

<Font Size=+1><u>Syntax</u></Font><p>



<pre>
 TGKeyXTerm::FillTEvent(TEvent &e);
</pre>


<Font Size=+1><u>Member of the class:</u></Font>
TGKeyXTerm
<p>



<Font Size=+1><u>Description</u></Font><p>

Fills the TV event structure for a key.
<p>






</body>
</html>
